Optimal. Leaf size=114 \[ -\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {a^4 x}{c^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ -\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {a^4 x}{c^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^4}{(c-i c \tan (e+f x))^3} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(c-i c \tan (e+f x))^7} \, dx\\ &=\frac {\left (i a^4\right ) \operatorname {Subst}\left (\int \frac {(c-x)^3}{(c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\left (i a^4\right ) \operatorname {Subst}\left (\int \left (\frac {1}{-c-x}+\frac {8 c^3}{(c+x)^4}-\frac {12 c^2}{(c+x)^3}+\frac {6 c}{(c+x)^2}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=-\frac {a^4 x}{c^3}+\frac {i a^4 \log (\cos (e+f x))}{c^3 f}-\frac {8 i a^4}{3 f (c-i c \tan (e+f x))^3}+\frac {6 i a^4}{c f (c-i c \tan (e+f x))^2}-\frac {6 i a^4}{f \left (c^3-i c^3 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.60, size = 143, normalized size = 1.25 \[ \frac {a^4 (\cos (3 e+7 f x)+i \sin (3 e+7 f x)) \left (-9 \sin (e+f x)+6 i f x \sin (3 (e+f x))+2 \sin (3 (e+f x))-3 i \cos (e+f x)+\cos (3 (e+f x)) \left (3 i \log \left (\cos ^2(e+f x)\right )-6 f x-2 i\right )+3 \sin (3 (e+f x)) \log \left (\cos ^2(e+f x)\right )\right )}{6 c^3 f (\cos (f x)+i \sin (f x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 68, normalized size = 0.60 \[ \frac {-2 i \, a^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 3 i \, a^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 i \, a^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 6 i \, a^{4} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{6 \, c^{3} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.80, size = 193, normalized size = 1.69 \[ -\frac {-\frac {30 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{3}} + \frac {60 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{3}} - \frac {30 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{3}} + \frac {-147 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1002 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2445 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3820 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2445 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1002 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 147 i \, a^{4}}{c^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}}}{30 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 91, normalized size = 0.80 \[ \frac {6 a^{4}}{f \,c^{3} \left (\tan \left (f x +e \right )+i\right )}-\frac {i a^{4} \ln \left (\tan \left (f x +e \right )+i\right )}{f \,c^{3}}-\frac {8 a^{4}}{3 f \,c^{3} \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {6 i a^{4}}{f \,c^{3} \left (\tan \left (f x +e \right )+i\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.73, size = 102, normalized size = 0.89 \[ -\frac {\frac {6\,a^4\,{\mathrm {tan}\left (e+f\,x\right )}^2}{c^3}-\frac {8\,a^4}{3\,c^3}+\frac {a^4\,\mathrm {tan}\left (e+f\,x\right )\,6{}\mathrm {i}}{c^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}-\frac {a^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{c^3\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.60, size = 172, normalized size = 1.51 \[ \frac {i a^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{3} f} + \begin {cases} - \frac {2 i a^{4} c^{6} f^{2} e^{6 i e} e^{6 i f x} - 3 i a^{4} c^{6} f^{2} e^{4 i e} e^{4 i f x} + 6 i a^{4} c^{6} f^{2} e^{2 i e} e^{2 i f x}}{6 c^{9} f^{3}} & \text {for}\: 6 c^{9} f^{3} \neq 0 \\\frac {x \left (2 a^{4} e^{6 i e} - 2 a^{4} e^{4 i e} + 2 a^{4} e^{2 i e}\right )}{c^{3}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________